from flask import *
from flask import Flask

app = Flask(__name__)  # 初始化app


@app.route('/test', methods=["POST"])  # 建立路由
def hello():
    file = request.files.get('file')
    if file:
        file.save(f"d:/tmp/{file.filename}")


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)  # 运行app
